import request from '@/utils/request';

// 删除在线课程
export function deleteLiveDetail(activityId) {
  return request({
    url: `/webCast/delete/${activityId}`,
    method: 'delete'
  });
}

// 更新在线课程
export function updateLive(params) {
  return request({
    url: `/webCast/update`,
    method: 'post',
    data: params
  });
}

export function getLiveDetail(activityId) {
  return request({
    url: `/webCast/detail/${activityId}`,
    method: 'get'
  });
}

// 在线课程列表
export function getUsersList(params) {
  return request({
    url: '/webCast/webCastManagerPage',
    method: 'post',
    data: params
  });
}

// 教研列表
export function getTeachingResearchList(params) {
  return request({
    url: '/teachingResearch/list',
    method: 'post',
    data: params
  });
}

// 备课列表
export function personPrepareLessonList(params) {
  return request({
    url: '/personPrepareLesson/page',
    method: 'post',
    data: params
  });
}

// 教研详情
export function getTeachingResearchDetail(activityId) {
  return request({
    url: `/teachingResearch/getTeachingResearchDetail?activityId=${activityId}`,
    method: 'get'
  });
}

// 更新教研
export function updateTeaching(params) {
  return request({
    url: `/teachingResearch/update`,
    method: 'post',
    data: params
  });
}

// 更新教研 - 步骤
export function udpateStep(params) {
  return request({
    url: `/teachingResearch/udpateStep`,
    method: 'post',
    data: params
  });
}

// 查询栏目标签
export function findColumnTags(params) {
  return request({
    url: `/tags/findColumnTags`,
    method: 'post',
    data: params
  });
}

// 根据上层分类查询下层分类列表
export function findByPCateId(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/category/findByPCateId`,
    method: 'post',
    params: params
  });
}

// 查找标签列表 - 在线课程 tagsKindEnum: WEB_CAST  tagsTypeEnum:CATEGORY_TAGS
export function findTagsList(params) {
  return request({
    url: `/tags/findTagsList`,
    method: 'post',
    data: params
  });
}

// 评论
export function getComment(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/comment/page`,
    method: 'post',
    data: params
  });
}

// 二级评论
export function replyPage(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/comment/replyPage`,
    method: 'post',
    data: params
  });
}

// 评论 屏蔽/恢复
export function updateStatus(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/comment/updateStatus`,
    method: 'post',
    params: params
  });
}

// 内容审核 通过/不通过
export function audit(params) {
  return request({
    url: `/contentAudit/audit`,
    method: 'post',
    params: params
  });
}

// 内容审核 违规/取消违规
export function processStatus(params) {
  return request({
    url: `/contentAudit/process`,
    method: 'post',
    data: params
  });
}

// 内容审核 备课 违规/取消违规
export function verify(params) {
  return request({
    url: `/personPrepareLesson/verify`,
    method: 'post',
    params: params
  });
}

// 活动 - 获取参与者列表
export function participantItemPage(params) {
  return request({
    url: `/activity/getParticipantItemPage`,
    method: 'post',
    data: params
  });
}

// 活动 - 获取报名人数
export function enroll(params) {
  return request({
    url: '/activity/getEnroll',
    method: 'post',
    data: params
  });
}

// 活动 - 操作日志
export function operateLogFindPage(params) {
  return request({
    url: `/operateLog/findPage`,
    method: 'post',
    data: params
  });
}
